<?php
ob_start();
session_start();
include('includes/dbconnection.php');

$uname = $_POST['username'];
$pass = $_POST['password'];
$pass = md5($pass); 

$query = mysql_query("select * from administration where Username='$uname' and Password='$pass'");
$check = mysql_num_rows($query);
if($check == 1)
{
	$q = mysql_fetch_array($query);
	$_SESSION['tcADMINID'] = $q["Id"];	
	//header("location:index.php");
	echo "<script>window.location='index.php'</script>";
}
else
{
	//header("location:index.php?_e=1");
	echo "<script>window.location='index.php?_e=1'</script>";
}
?>